CC=cc -g -Wall -pthread
PORT=6789
HOST=localhost

all: client server

client: client.c
	${CC} -o client client.c

server: server.c
	${CC} -o server server.c

leakcheckserver: server 
	valgrind --leak-check=full ./server ${PORT}

leakcheckclient: client
	valgrind --leak-check=full ./client ${HOST} ${PORT}

hgcheck: server
	valgrind --tool=helgrind --read-var-info=yes ./server ${PORT}

drdcheck: server
	valgrind --tool=drd ./server ${PORT}

runserver: server
	./server ${PORT}

runclient: client
	./client ${HOST} ${PORT}

